import styles from './index.module.less'
import type { ManageType } from '@/pages/report/department/interface'
import { ConditionRender } from './ConditionRender'

export const TrainerReport = (props: { data?: ManageType }) => {
    const data = props.data

    return (
        <div className={styles.content}>
            <div>
                <p>{`${data?.create_date}`}</p>
                <p>{`您第一次来到${data?.platform}`}</p>
            </div>

            <ConditionRender condition={Boolean(data?.is_show_basic_student)}>
                <div>
                    <p>
                        2024，您开展了
                        <span>{`${data?.basic_student_module?.total_course_num || 0}`}</span>
                        个培训项目
                    </p>
                    <p>
                        <span>{`${data?.basic_student_module?.total_group_num || 0}`}</span>
                        期培训班，共
                        <span>{`${data?.basic_student_module?.total_student_num || 0}`}</span>
                        名参训学员
                    </p>
                    <p>
                        <span>有{`${data?.basic_student_module?.total_quality_student_num}`}</span>
                        人培训合格，合格率
                        <span>{`${data?.basic_student_module?.quality_percent || '0%'}`}</span>
                    </p>
                    <ConditionRender condition={Boolean(data?.is_show_course_student)}>
                        <p>
                            <span>{`${data?.course_student_module[0]?.course_name || '-'}`}</span>
                            培训量最高
                        </p>
                    </ConditionRender>
                </div>
            </ConditionRender>

            <div>
                <ConditionRender condition={Boolean(data?.is_show_category_student)}>
                    <p>
                        参训学员类型最多的是
                        <span>{`【${data?.category_student_module.category || '-'}】`}</span>
                    </p>
                </ConditionRender>

                <ConditionRender condition={Boolean(data?.is_show_degree_student)}>
                    <p>
                        参训学员文化程度最多的是
                        <span>{`【${data?.degree_student_module.degree || '-'}】`}</span>
                    </p>
                </ConditionRender>

                <ConditionRender condition={Boolean(data?.is_show_quarter_student)}>
                    <p>
                        培训时间集中在<span>{`【${data?.busy_quarter}】`}</span>
                    </p>
                </ConditionRender>
            </div>

            <div>
                <p>{`很荣幸能陪伴您走过${data?.live_day}天`}</p>
                <p>{`2025，${data?.platform}与您一起为创业之路，奠定坚实基础`}</p>
            </div>
        </div>
    )
}
